package com.back_end.IO;

import java.io.*;

public class TestIO {
    public static void main(String[] args) {
        InputStream inputStream = null;

        OutputStream outputStream = null;



        inputStream = System.in;
        outputStream = System.out;

        int data = -1;

        try {
            data = inputStream.read();
            outputStream.write(data);
            outputStream.flush();
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            if (inputStream != null) {
                try {
                    inputStream.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            if (outputStream != null) {
                try {
                    outputStream.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }

    }
}
